#include <tcl.h> char * Tcl_PkgRequire(interp, name, version, exact) int Tcl_PkgProvide(interp, name, version)
These procedures provide C-level interfaces to Tcl's package and version management facilities. Tcl_PkgRequire is equivalent to the package require command, and Tcl_PkgProvide is equivalent to the package provide command. See the documentation for the Tcl commands for details on what these procedures do. If Tcl_PkgRequire completes successfully it returns a pointer to the version string for the version of the package that is provided in the interpreter (which may be different than version); if an error occurs it returns NULL and leaves an error message in interp->result. Tcl_PkgProvide returns TCL_OK if it completes successfully; if an error occurs it returns TCL_ERROR and leaves an error message in interp->result.